import {computed} from "vue"
import {getFormFieldShowName} from "components/NewCom/WkForm/utils.js";

export function useBusinessCheck() {
  function relativeBusinessClick(crmOption, elTableOption, data) {
    elTableOption.rowID = data.businessId
    elTableOption.rowType = 'business'
    crmOption.showDview = true
  }


  function businessClose(e, scope) {
    // todo whf
    const popoverEl = e.parentNode
    scope.row.show= false
    // popoverEl.__vue__.showPopper = false
    // this.$set(scope.row, 'show', false)
  }

// businessCheck的el-popover
  function businessCheckClick(e, scope) {
    // todo whf
    if (scope.row.businessCount == 0) {
      return
    }

    scope.row.show= !scope.row.show
  }
  return {relativeBusinessClick,businessClose,businessCheckClick}
}